
clear all
use data/judgeyear-bott.dta

foreach y in numwords_maj_m numtoc_maj_m poscites_m distcites_m negcites_m outstatecites_m discusscites_m quotecites_m {

gen log`y' = log(1+`y')

// year FE only
eststo: quietly reg log`y' i.year 			nptou10* ptou10* ptonp10* termup10* iac10* adminoffice10* mandretire10* judgesup10* ptog10* ntou10* nptou10window ptou10window ptonp10window ptog10window ntou10window termup10window iac10window mandretire10window judgesup10window adminoffice10window, 		 vce(cluster stateabb)
// state FE and state trend
eststo: quietly areg log`y' i.year i.statefe#c.year 	nptou10* ptou10* ptonp10* termup10* iac10* adminoffice10* mandretire10* judgesup10* ptog10* ntou10* nptou10window ptou10window ptonp10window ptog10window ntou10window termup10window iac10window mandretire10window judgesup10window adminoffice10window, absorb(statefe) vce(cluster stateabb)
// judge FE and state trend
eststo: quietly areg log`y' i.year i.statefe#c.year 	nptou10* ptou10* ptonp10* termup10* iac10* adminoffice10* mandretire10* judgesup10* ptog10* ntou10* nptou10window ptou10window ptonp10window ptog10window ntou10window termup10window iac10window mandretire10window judgesup10window adminoffice10window, absorb(judgefe) vce(cluster stateabb)

}
esttab using tables/iac-bott.csv, nogaps replace ar2 se drop(_cons *year *window) star(+ 0.10 * 0.05 ** 0.01)
